import config from '../../config/index.js';

class GHFilter {
  constructor() { 

  }
  // 原图绝对路径
  static absolutePath(thumb) {
    if (!thumb || thumb.length == 0) {
      return '';
    }
    return `${config.Domain}${config.FilePath}${thumb}`;
  }
  //压缩图绝对路径
  static absolutePathWithCompress(thumb, w = 300) {
    if (!thumb || thumb.length == 0) {
      return '';
    }
    return `${config.Domain}${config.FilePath}/ajax/shareimg?url=${thumb}&w=${w}`;
  }
}

export default GHFilter;